<template>
  <div id="asseta1" class="vH">
    <mei-layout>
      <mei-layout-left title="资产分类" width="240px">
        <assetA2Tree ref="tree" @onNodeClick="onNodeClick"></assetA2Tree>
      </mei-layout-left>
      <mei-layout-main title="资产信息">
        <assetA1List ref="list" :asset60s="data.asset60s"></assetA1List>
      </mei-layout-main>
    </mei-layout>
  </div>
</template>

<script>
import assetA2Tree from "./components/assetA2Tree";
import assetA1List from "./components/assetA1List";
export default {
  name: "AssetA1",
  data() {
    return {
      //页面控制
      page: {
        leftwidth: "240px"
      },
      //数据
      data: {
        asset60s: "",
        assetquery: [] //高级查询条件
      }
    };
  },
  provide() {
    return {
      AssetA1: this
    };
  },
  //外部属性
  props: {},
  //内部方法
  methods: {
    initPage() {},
    onNodeClick(ids) {
      this.data.asset60s = ids.toString();
    },
    setAssetQuery(assetquery = []) {
      this.data.assetquery = assetquery;
      this.getData();
    },
    //触发刷新
    getData() {
      this.$refs.tree.getAssetA2();
      this.$refs.list.getAssetA1Data();
    }
  },
  //组件
  components: {
    assetA2Tree, //分类树组件
    assetA1List //资产列表组件
  },
  //初始化 异步加async await
  mounted() {
    this.initPage();
  },
  //计算属性
  computed: {},
  //监视
  watch: {}
};
</script>

<style lang="scss" scoped>
@import "@/style/base.scss";
</style>
